This page last changed on Jan 09, 2008 by tkatz.
eDocs Home > BEA AquaLogic Data Services Platform 3.0 Documentation > Data Services Developer's Guide
Use the Source Editor
This section describes the ALDSP Source editor and highlights its editing features. The following topics are included:
What is the Source Editor?
The Source editor is available from a tab in the ALDSP Eclipse perspective. As you build up your data service, the underlying source is always available from this editor.
Data service source typically:
- References a schema as the data service's XML type (for Entity data services).
- Defines functions in the data service.
- Declares namespaces for referenced data services.
- Contains pragma directives to the query engine.
In addition, data services created from physical data sources contain physical source metadata. For example, data services based on relational data describe the XML type (such as xs:string), the XPath, native size, native type, null-ability setting and so forth.
In developing data services there are many occasions when it is necessary or convenient to view and/or modify source.
The Source editor allows you to directly edit data service source code, as well as schemas. Changes to source are immediately reflected in other data service modes such as the Query view editor; similarly, source is immediately updated when changes are made through the Query editor or in Overview mode.
 | When a data service is created the root level of your dataspace has "ld:" as its namespace. ld referred to the original name of ALDSP, Liquid Data.
declare namespace ns4= "ld:Update/PhysicalDSs/SDO_WLCO_SET";
|
Searching Source
Eclipse offers several types of search.
- You can find all occurrences of a string in Source view using Eclipse Search menu. Each instance of the term in your project will be highlighted.
- You can use page search (Ctrl-F). search to find the next occurrence of a term. Standard search/replace functionality is available.
File Search in Eclipse

Navigating to Specific Functions
To open Source View to a particular query function in Overview mode, first select the function, then click the Source tab.
Color Coding
XQuery documents in Source View are color-coded according to the following scheme:
Color |
Meaning |
Blue |
Keywords |
Dark gray |
Comments |
Magenta |
Variable |
Dark green |
XML markup |
Red |
Error conditions |
Code Completion
Code completion is available for XPath built-in and user-defined functions. Similarly, function completion is invoked when you type a namespace prefix followed by a colon.
Function Completion from Namespace

XPath Completion in Source View

Selecting from Available XQuery Functions

Error Identification
Syntax errors that occur in source either as a result of editing or as a result of changes made in the XQuery Editor appear in the Problems tab.
Windows > Show View > Problems
Induced Error Condition in Source View

 | Tips
- Click on the error condition in the Problems tab, your cursor will be placed on the relevant line of code.
- Mouse over the error indicator in the Source editor, the complete error condition will appear.
- Right-click on the left margin of Source view several options appear including the option to make line numbering active.
- Right-click anywhere in Source view to access Source editor Preferences including permanently displaying line numbering.
|
Contact BEA | Feedback | Privacy | (c) 2008 BEA Systems
|